package com.lagou.service;

import com.lagou.bean.Student;
import com.lagou.dao.StudentDao;
import com.lagou.factory.StudentDaoFactory;

import java.util.List;

public class StudentService {
    private StudentDao studentDao;

    public StudentService() {
        this.studentDao = StudentDaoFactory.getStudentDao();
    }

    //获取学生信息
    public List<Student> stdQurService() {
        return studentDao.getstd();
    }

    //添加学生信息
    public boolean addStd(Student student){
        return studentDao.addStd(student);
    }


    //更新学生信息
    public boolean updateStd(Student student){
        return  studentDao.updateStd(student);
    }

    //删除学生信息
    public boolean delStd(Student student){
        return  studentDao.delStd(student);
    }
}
